package com.avic.modules.record.service.mapper;

import com.avic.common.mapper.CoreMapper;
import com.avic.modules.record.domain.SeeYouTomorrow;
import com.avic.modules.record.domain.Yesterday;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author zhangzikang
 * @date 2022-08-14
 */
@Repository
@Mapper
public interface YesterdayMapper extends CoreMapper<Yesterday> {

    // 查询某个设备昨天记录
    @Select("select s.* FROM yesterday s where s.equip_id = #{equipId}")
    Yesterday selectEquipId(@Param("equipId") String equipId);

    /**
     * 清空表数据
     */
    @Delete("TRUNCATE TABLE yesterday")
    void del();
}
